//
//  UserLogic.h
//  MyApplication
//
//  Created by 彭凯敏 on 15/7/29.
//  Copyright (c) 2015年 52xiaoluo. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "BaseLogic.h"
#import "Request.h"
#import "account.pb.h"

@interface UserLogic : BaseLogic<RequestDelegate>

+(instancetype) shareInstance;

@property (strong, nonatomic) NSString *token;


/**
 *  登录
 */
- (void)loginWithUser:(User *)user;
/**
 *  注册
 *
 *  @param user    user
 *  @param codeStr 验证码
 */
- (void)registWithUser:(User *)user andCode:(NSString *)codeStr;


- (UInt64) getUserId;

- (Session *) getSession;

- (void) logout;
- (void) logoutReq;

-(NSString*)getDBName;

-(NSUserDefaults *)getUserDefault;
@end
